home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 13 - 1997 (partial) / 13.04 Apr 97 / OpenDocExtentions / SelectPart / OSAPlugIn.make < prev    next >
Encoding:
Text File  |  1996-06-19  |  8.2 KB  |  238 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        OSAPlugIn.make
  3. #
  4. #    Contains:    Makefile for OSAPlugIn part
  5. #
  6. #    Written by:    Sue Dumont
  7. #
  8. #    Copyright:    © 1994-1995 by Apple Computer, Inc., all rights reserved.
  9. #                
  10.  
  11. #---------------------------------------------------------------------------    
  12. # PROJECT VARIABLES
  13. #---------------------------------------------------------------------------    
  14.  
  15. TargetName            = OSAPlugIn
  16. TargetNameILink        = {TargetName} (68k)
  17. TargetNamePPCLink    = {TargetName} (PPC)
  18. TargetNameFat        = {TargetName} (fat)
  19.  
  20. TargetCreatorType    = PUNR
  21.  
  22. SourceDir             = {TargetDir}OSAPlugIn:
  23. SelectPartDir        = {TargetDir}Source:
  24.  
  25. AdditionalIncludes    =     -i "{SourceDir}"    -i "{SelectPartDir}"
  26.  
  27.  
  28. #---------------------------------------------------------------------------    
  29. # CFM/PEF Version Numbers
  30. #---------------------------------------------------------------------------    
  31. # For detailed instructions on proper CFM/PEF version numbering, see
  32. # Code Fragment Chapter (pg 3-7), Inside Macintosh: PowerPC System Software
  33. #---------------------------------------------------------------------------    
  34.  
  35. CurrentLibraryVersion =        0x01048000        # 1.0.4 Final
  36. LibraryExportsVersion =        0x00000000        # 0.0
  37. LibraryCodeVersion =        0x00000000        # 0.0
  38.  
  39. #---------------------------------------------------------------------------    
  40. # DIRECTORY DEPENDENCIES
  41. #---------------------------------------------------------------------------    
  42.  
  43. "{TargetDir}"  ƒ "{SourceDir}"
  44. "{ObjectsDir}" ƒ "{SourceDir}"
  45. "{ObjectsDir}" ƒ "{ODUtilsImplDir}"
  46.  
  47. #---------------------------------------------------------------------------    
  48. # ROOT TARGET
  49. #---------------------------------------------------------------------------    
  50.  
  51. BUILDPPCLINK ƒ     ∂
  52.     "{CppPrecompiledHeaders}"                    ∂
  53.     "{TargetDir}{TargetNamePPCLink}"            ∂
  54.     "{SourceDir}SelectPartAgent.exp"
  55.  
  56. BUILDILINK ƒ ∂
  57.     "{CppPrecompiledHeaders}"                    ∂
  58.     "{TargetDir}{TargetNameILink}"                ∂
  59.     "{SourceDir}SelectPartAgent.exp"
  60.  
  61. BUILDREZ ƒ ∂
  62.     "{ObjectsDir}{TargetName}.PPC.rsrc"            ∂
  63.     "{ObjectsDir}{TargetName}.68k.rsrc"
  64.  
  65. BUILDIDL ƒ ∂
  66.     "{SourceDir}SelectPartAgent.xih"            ∂
  67.     "{SourceDir}SelectPartAgent.xh"            ∂
  68.     "{SourceDir}SelectPartAgent.exp"
  69.     
  70. #---------------------------------------------------------------------------    
  71. # FILE LIST VARIABLES
  72. #---------------------------------------------------------------------------    
  73.  
  74. OSAPlugInOBJECTS =                 ∂
  75.     "{ObjectsDir}OSAPlugIn.cpp.o"                ∂
  76.     "{ObjectsDir}SelectPartAgent.cpp.o"        ∂
  77.     "{ObjectsDir}SelectPartAgentInit.cpp.o"
  78.     
  79. OpenDocUtilityOBJECTS =             ∂
  80.     "{ObjectsDir}Except.cpp.o"                     ∂
  81.     "{ObjectsDir}Crawl.cpp.o"                     ∂
  82.     "{ObjectsDir}IText.cpp.o"                     ∂
  83.     "{ObjectsDir}ISOStr.cpp.o"                     ∂
  84.     "{ObjectsDir}ODDebug.cpp.o"                 ∂
  85.     "{ObjectsDir}ODMemory.cpp.o"                ∂
  86.     "{ObjectsDir}ODNew.cpp.o"                    ∂
  87.     "{ObjectsDir}ODNewObj.cpp.o"                    ∂
  88.     "{ObjectsDir}ODUtils.cpp.o"                    ∂
  89.     "{ObjectsDir}PlfmFile.cpp.o"                 ∂
  90.     "{ObjectsDir}PasclStr.cpp.o"                ∂
  91.     "{ObjectsDir}StdTypIO.cpp.o"                ∂
  92.     "{ObjectsDir}TempObj.cpp.o"                    ∂
  93.     "{ObjectsDir}UseRsrcM.cpp.o"
  94.  
  95. #---------------------------------------------------------------------------    
  96. # DEPENDENCIES
  97. #---------------------------------------------------------------------------    
  98.  
  99. # IDL    
  100.  
  101. "{SourceDir}"SelectPartAgent.cpp ƒ             ∂
  102.     "{SourceDir}"SelectPartAgent.idl
  103.     
  104. "{SourceDir}"SelectPartAgent.xih ƒ            ∂
  105.     "{SourceDir}"SelectPartAgent.xh            ∂
  106.     "{SourceDir}"SelectPartAgent.idl
  107.     
  108. "{SourceDir}"SelectPartAgent.xh ƒ                ∂
  109.     "{SourceDir}"SelectPartAgent.idl
  110.  
  111.  
  112. # SOURCE/OBJECT CODE
  113.  
  114. "{ObjectsDir}OSAPlugIn.cpp.o"    ƒ            ∂
  115.     "{SourceDir}OSAPlugIn.cpp"                        
  116.  
  117. "{ObjectsDir}SelectPartAgent.cpp.o"    ƒ        ∂
  118.     "{SourceDir}SelectPartAgent.cpp"             ∂
  119.     "{SourceDir}SelectPartAgent.xih"                     
  120.  
  121. "{ObjectsDir}SelectPartAgentInit.cpp.o"    ƒ    ∂
  122.     "{SourceDir}SelectPartAgentInit.cpp"
  123.  
  124. #---------------------------------------------------------------------------    
  125. # BUILD LIBRARIES
  126. #---------------------------------------------------------------------------    
  127.  
  128. # --- 68k Link ---
  129.  
  130. "{TargetDir}{TargetNameILink}" ƒƒ     {OSAPlugInOBJECTS}                    ∂
  131.                                     {OpenDocUtilityOBJECTS}                ∂
  132.                                     "{SourceDir}SelectPartAgent.exp"
  133.     Echo Linking: {TargetNameILink}
  134.     {LinkTool}    ∂
  135.         -export `ConvertExportList "{SourceDir}SelectPartAgent.exp"`,ODShellPlugInInstall ∂
  136.         {ILinkOptions}                                        ∂
  137.         {ILinkShLibOptions}                                    ∂
  138.         -init SelectPartAgentCFMInit                        ∂
  139.         -term SelectPartAgentCFMTerminate                    ∂
  140.         -vercur {CurrentLibraryVersion}                        ∂
  141.         -verdef {LibraryExportsVersion}                        ∂
  142.         -verimp {LibraryCodeVersion}                        ∂
  143.         {ShLibPreLibraries}                                    ∂
  144.         {OSAPlugInOBJECTS}                                    ∂
  145.         {OpenDocUtilityOBJECTS}                                ∂
  146.         "{ODCFMLibrariesDir}OpenDoc Core.stub"                ∂
  147.         "{ODCFMLibrariesDir}OpenDoc User Interface.stub"    ∂
  148.         "{ODCFMLibrariesDir}OpenDoc Layout.stub"            ∂
  149.         "{ODCFMLibrariesDir}OpenDoc Storage.stub"            ∂
  150.         "{ODCFMLibrariesDir}Memory Manager.stub"            ∂
  151.         {ShLibPostLibraries}                                ∂
  152.         -o "{ObjectsDir}{TargetNameILink}".seg
  153.     If !{Status}
  154.         Echo Building: {TargetNameILink}.SYM
  155.         {SymTool} "{ObjectsDir}{TargetNameILink}".seg.NJ    ∂
  156.                 -o "{TargetDir}{TargetNameILink}".SYM -sym 3.2
  157.         Echo Building: {TargetNameILink}∂'s code∂/data fragment
  158.         MakeFlat "{ObjectsDir}{TargetNameILink}".seg -o "{TargetDir}{TargetNameILink}"
  159.         Echo Copying: {TargetNameILink}∂'s resources
  160.         Echo "include ∂"{RsrcObjectsDir}{TargetName}.68k.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  161.         Echo "delete 'ckid';"  | Rez -a -o "{TargetDir}{TargetNameILink}"
  162.         SetFile -a Bi -c "{TargetCreatorType}" {Targ}
  163.     End
  164.  
  165.  
  166. # --- PowerPC Link ---
  167.  
  168. "{TargetDir}{TargetNamePPCLink}" ƒƒ        {OSAPlugInOBJECTS}                    ∂
  169.                                         {OpenDocUtilityOBJECTS}                ∂
  170.                                         "{SourceDir}SelectPartAgent.exp"
  171.     Echo Linking: {TargetNamePPCLink}
  172.     {LinkTool}    ∂
  173.         -export `ConvertExportList "{SourceDir}SelectPartAgent.exp"`,ODShellPlugInInstall ∂
  174.         {PPCLinkOptions}                                    ∂
  175.         {PPCLinkShLibOptions}                                ∂
  176.         -init SelectPartAgentCFMInit                        ∂
  177.         -term SelectPartAgentCFMTerminate                    ∂
  178.         -vercur {CurrentLibraryVersion}                        ∂
  179.         -verdef {LibraryExportsVersion}                        ∂
  180.         -verimp {LibraryCodeVersion}                        ∂
  181.         {PPCShLibPreLibraries}                                ∂
  182.         {OSAPlugInOBJECTS}                                    ∂
  183.         {OpenDocUtilityOBJECTS}                                ∂
  184.         "{ODCFMLibrariesDir}OpenDoc Core.stub"                ∂
  185.         "{ODCFMLibrariesDir}OpenDoc User Interface.stub"    ∂
  186.         "{ODCFMLibrariesDir}OpenDoc Storage.stub"            ∂
  187.         "{ODCFMLibrariesDir}OpenDoc Layout.stub"            ∂
  188.         "{ODCFMLibrariesDir}Memory Manager.stub"            ∂
  189.         {PPCShLibPostLibraries}                                ∂
  190.         -o "{ObjectsDir}{TargetNamePPCLink}"
  191.     If !{Status}
  192.         Move "{ObjectsDir}{TargetNamePPCLink}" "{TargetDir}"
  193.         if ( `exists "{ObjectsDir}{TargetNamePPCLink}".xcoff != ""` )
  194.             Echo Building: {TargetNamePPCLink}.xSYM
  195.             {SymTool} "{ObjectsDir}{TargetNamePPCLink}".xcoff            ∂
  196.                     {AdditionalIncludes} -i "{ODUtilsImplDir}"            ∂
  197.                     -sym on,3.2 -o "{TargetDir}{TargetNamePPCLink}".xSYM
  198.         end
  199.         Echo Copying: {TargetNamePPCLink}∂'s resources
  200.         Echo "include ∂"{RsrcObjectsDir}{TargetName}.PPC.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  201.         Echo "delete 'ckid';"  | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  202.         SetFile -a Bi -c "{TargetCreatorType}" {Targ}
  203.     End
  204.  
  205. #---------------------------------------------------------------------------    
  206. # REZ STEPS
  207. #---------------------------------------------------------------------------    
  208.  
  209. "{RsrcObjectsDir}{TargetName}.PPC.rsrc"    ƒ                                ∂
  210.                                         "{SourceDir}OSAPlugIn.r"        ∂
  211.                                         "{SourceDir}OSAPlugInDef.h"        ∂
  212.                                         "{SourceDir}OSAPlugInVers.h"    ∂
  213.                                         "{SourceDir}ScriptingPlugIn.rsrc"
  214.     Echo Rezzing: {TargetName}.r (for PPC)
  215.     Rez {RezOptions} {ODRezIntf} "{SourceDir}{TargetName}.r" -o {targ}
  216.     Echo "delete 'ckid';"  | Rez -a -o {Targ}
  217.     SetFile -a i -c "{ResEditCreator}" -t "{ResEditFileType}" {Targ}
  218.     if ( `exists "{TargetDir}{TargetNamePPCLink}" != ""` )
  219.         Echo Copying: {TargetNamePPCLink}∂'s resources
  220.         Echo "include ∂""{Targ}"∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  221.     end    
  222.  
  223. "{RsrcObjectsDir}{TargetName}.68k.rsrc"    ƒ                                ∂
  224.                                         "{SourceDir}OSAPlugIn.r"        ∂
  225.                                         "{SourceDir}OSAPlugInDef.h"        ∂
  226.                                         "{SourceDir}OSAPlugInVers.h"    ∂
  227.                                         "{SourceDir}ScriptingPlugIn.rsrc"
  228.     Echo Rezzing: {TargetName}.r (for 68k)
  229.     Rez -d _68KBUILD_ {RezOptions} {ODRezIntf} "{SourceDir}{TargetName}.r" -o {Targ} 
  230.     Echo "delete 'ckid';"  | Rez -a -o {Targ}
  231.     SetFile -a i -c "{ResEditCreator}" -t "{ResEditFileType}" {Targ}
  232.     if ( `exists "{TargetDir}{TargetNameILink}" != ""` )
  233.         Echo Copying: {TargetNameILink}∂'s resources
  234.         Echo "include ∂""{Targ}"∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  235.     end
  236.  
  237.  
  238.